export default {
    namespace: 'contact',
    state: {
        infor: {
            name: '王富强',
            department: '骨科',
            role: '主治医师',
            userName: 'username',
            gender: '男',
            institution: '郑州大学第一附属医院',
            phoneNumber: '12345678901',
            email: 'email@email.com.cn',
        },
        favorite: {},
        discuss: {},
        appointment: {},
        right: 'center',
    },
    reducers: {
        changeRight(state, {payload}) {
            return {
                ...state,
                right: payload,
            };
        },
    },
    effects: {},
    subscriptions: {},
    // effects: {
    //     *init({ payload }, { put, select }) {
    //         const {
    //             filter: { departmentId },
    //             departments
    //         } = yield select((state) => state.patients);
    //         if (!departmentId) {
    //             if (departments.length > 0) {
    //                 const { value: departmentId } = departments[0];
    //                 yield put({
    //                     type: 'setFilter',
    //                     payload: departmentId,
    //                 });
    //             }
    //         }
    //     },
    // },
    // subscriptions: {
    //     setup(args) {
    //         const { dispatch, history } = args;
    //         history.listen(location => {
    //             if (location.pathname === '/my') {
    //                 dispatch({
    //                     type: 'init',
    //                 });
    //             }
    //         });
    //     }
    // },
};
